<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::TreeNearestNeighbors&lt; InputType, LabelType &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html">TreeNearestNeighbors</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_tree_nearest_neighbors-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::TreeNearestNeighbors&lt; InputType, LabelType &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Nearest Neighbors implementation using binary trees.  
 <a href="classshark_1_1_tree_nearest_neighbors.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_tree_nearest_neighbors_8h_source.html">shark/Algorithms/NearestNeighbors/TreeNearestNeighbors.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::TreeNearestNeighbors&lt; InputType, LabelType &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_tree_nearest_neighbors__inherit__graph.png" border="0" usemap="#ashark_1_1_tree_nearest_neighbors_3_01_input_type_00_01_label_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_tree_nearest_neighbors_3_01_input_type_00_01_label_type_01_4_inherit__map" id="ashark_1_1_tree_nearest_neighbors_3_01_input_type_00_01_label_type_01_4_inherit__map">
<area shape="rect" title="Nearest Neighbors implementation using binary trees." alt="" coords="17,94,209,135"/>
<area shape="rect" href="classshark_1_1_abstract_nearest_neighbors.html" title="Interface for Nearest Neighbor queries." alt="" coords="5,5,221,46"/>
<area shape="poly" title=" " alt="" coords="116,62,116,94,110,94,110,62"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a81535a6dc1129bf3b9c5db033706ee7d" id="r_a81535a6dc1129bf3b9c5db033706ee7d"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a81535a6dc1129bf3b9c5db033706ee7d">Dataset</a></td></tr>
<tr class="separator:a81535a6dc1129bf3b9c5db033706ee7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a963f6592ded4228aa2a34366b4b5bf15" id="r_a963f6592ded4228aa2a34366b4b5bf15"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_binary_tree.html">BinaryTree</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a963f6592ded4228aa2a34366b4b5bf15">Tree</a></td></tr>
<tr class="separator:a963f6592ded4228aa2a34366b4b5bf15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad884ac010262866e0fbc13878d7fc0b4" id="r_ad884ac010262866e0fbc13878d7fc0b4"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#aca52936d3edcb0538a5be59fff147216">base_type::DistancePair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#ad884ac010262866e0fbc13878d7fc0b4">DistancePair</a></td></tr>
<tr class="separator:ad884ac010262866e0fbc13878d7fc0b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00707a24f04878d9c64546366e3cccea" id="r_a00707a24f04878d9c64546366e3cccea"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a00707a24f04878d9c64546366e3cccea">BatchInputType</a></td></tr>
<tr class="separator:a00707a24f04878d9c64546366e3cccea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_nearest_neighbors"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_nearest_neighbors')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html">shark::AbstractNearestNeighbors&lt; InputType, LabelType &gt;</a></td></tr>
<tr class="memitem:aca52936d3edcb0538a5be59fff147216 inherit pub_types_classshark_1_1_abstract_nearest_neighbors" id="r_aca52936d3edcb0538a5be59fff147216"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_key_value_pair.html">KeyValuePair</a>&lt; double, LabelType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#aca52936d3edcb0538a5be59fff147216">DistancePair</a></td></tr>
<tr class="separator:aca52936d3edcb0538a5be59fff147216 inherit pub_types_classshark_1_1_abstract_nearest_neighbors"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a246b7524f57646d1d830e03c05773824 inherit pub_types_classshark_1_1_abstract_nearest_neighbors" id="r_a246b7524f57646d1d830e03c05773824"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a246b7524f57646d1d830e03c05773824">BatchInputType</a></td></tr>
<tr class="separator:a246b7524f57646d1d830e03c05773824 inherit pub_types_classshark_1_1_abstract_nearest_neighbors"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad3c362695b3ab2d2ac28934e7901a98c" id="r_ad3c362695b3ab2d2ac28934e7901a98c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#ad3c362695b3ab2d2ac28934e7901a98c">TreeNearestNeighbors</a> (<a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a81535a6dc1129bf3b9c5db033706ee7d">Dataset</a> const &amp;<a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a05eda57f90ea8bbb9c1fbe773a7075e6">dataset</a>, <a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a963f6592ded4228aa2a34366b4b5bf15">Tree</a> const *tree)</td></tr>
<tr class="separator:ad3c362695b3ab2d2ac28934e7901a98c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93240024a5a340943a32c46c88347648" id="r_a93240024a5a340943a32c46c88347648"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classshark_1_1_tree_nearest_neighbors.html#ad884ac010262866e0fbc13878d7fc0b4">DistancePair</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a93240024a5a340943a32c46c88347648">getNeighbors</a> (<a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a00707a24f04878d9c64546366e3cccea">BatchInputType</a> const &amp;patterns, std::size_t k) const</td></tr>
<tr class="memdesc:a93240024a5a340943a32c46c88347648"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the k nearest neighbors of the point  <br /></td></tr>
<tr class="separator:a93240024a5a340943a32c46c88347648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05eda57f90ea8bbb9c1fbe773a7075e6" id="r_a05eda57f90ea8bbb9c1fbe773a7075e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt; const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a05eda57f90ea8bbb9c1fbe773a7075e6">dataset</a> () const</td></tr>
<tr class="memdesc:a05eda57f90ea8bbb9c1fbe773a7075e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const reference to the dataset used by the algorithm  <br /></td></tr>
<tr class="separator:a05eda57f90ea8bbb9c1fbe773a7075e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_nearest_neighbors"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_nearest_neighbors')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html">shark::AbstractNearestNeighbors&lt; InputType, LabelType &gt;</a></td></tr>
<tr class="memitem:a34d4b8de6de6c7eab9565d2e0eb4117d inherit pub_methods_classshark_1_1_abstract_nearest_neighbors" id="r_a34d4b8de6de6c7eab9565d2e0eb4117d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_shape.html">Shape</a> const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a34d4b8de6de6c7eab9565d2e0eb4117d">inputShape</a> () const</td></tr>
<tr class="memdesc:a34d4b8de6de6c7eab9565d2e0eb4117d inherit pub_methods_classshark_1_1_abstract_nearest_neighbors"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the expected shape of the inputs.  <br /></td></tr>
<tr class="separator:a34d4b8de6de6c7eab9565d2e0eb4117d inherit pub_methods_classshark_1_1_abstract_nearest_neighbors"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3af2987f23272193ca3a26cba59ce7d8 inherit pub_methods_classshark_1_1_abstract_nearest_neighbors" id="r_a3af2987f23272193ca3a26cba59ce7d8"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a3af2987f23272193ca3a26cba59ce7d8">~AbstractNearestNeighbors</a> ()</td></tr>
<tr class="separator:a3af2987f23272193ca3a26cba59ce7d8 inherit pub_methods_classshark_1_1_abstract_nearest_neighbors"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classshark_1_1_abstract_nearest_neighbors"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classshark_1_1_abstract_nearest_neighbors')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html">shark::AbstractNearestNeighbors&lt; InputType, LabelType &gt;</a></td></tr>
<tr class="memitem:a71d274e64e2eff7e1f72fa4fe3fb3473 inherit pro_attribs_classshark_1_1_abstract_nearest_neighbors" id="r_a71d274e64e2eff7e1f72fa4fe3fb3473"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a71d274e64e2eff7e1f72fa4fe3fb3473">m_inputShape</a></td></tr>
<tr class="separator:a71d274e64e2eff7e1f72fa4fe3fb3473 inherit pro_attribs_classshark_1_1_abstract_nearest_neighbors"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, class LabelType&gt;<br />
class shark::TreeNearestNeighbors&lt; InputType, LabelType &gt;</div><p>Nearest Neighbors implementation using binary trees. </p>
<p>Returns the labels and distances of the k nearest neighbors of a point. </p>

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00408">408</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a00707a24f04878d9c64546366e3cccea" name="a00707a24f04878d9c64546366e3cccea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00707a24f04878d9c64546366e3cccea">&#9670;&#160;</a></span>BatchInputType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt;<a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>&gt;::type <a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::BatchInputType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00417">417</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

</div>
</div>
<a id="a81535a6dc1129bf3b9c5db033706ee7d" name="a81535a6dc1129bf3b9c5db033706ee7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81535a6dc1129bf3b9c5db033706ee7d">&#9670;&#160;</a></span>Dataset</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt;<a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType&gt; <a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::Dataset</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00414">414</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

</div>
</div>
<a id="ad884ac010262866e0fbc13878d7fc0b4" name="ad884ac010262866e0fbc13878d7fc0b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad884ac010262866e0fbc13878d7fc0b4">&#9670;&#160;</a></span>DistancePair</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#aca52936d3edcb0538a5be59fff147216">base_type::DistancePair</a> <a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::DistancePair</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00416">416</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

</div>
</div>
<a id="a963f6592ded4228aa2a34366b4b5bf15" name="a963f6592ded4228aa2a34366b4b5bf15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a963f6592ded4228aa2a34366b4b5bf15">&#9670;&#160;</a></span>Tree</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_binary_tree.html">BinaryTree</a>&lt;<a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>&gt; <a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::Tree</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00415">415</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad3c362695b3ab2d2ac28934e7901a98c" name="ad3c362695b3ab2d2ac28934e7901a98c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3c362695b3ab2d2ac28934e7901a98c">&#9670;&#160;</a></span>TreeNearestNeighbors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::TreeNearestNeighbors </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a81535a6dc1129bf3b9c5db033706ee7d">Dataset</a> const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a963f6592ded4228aa2a34366b4b5bf15">Tree</a> const *&#160;</td>
          <td class="paramname"><em>tree</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00419">419</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

<p class="reference">References <a class="el" href="group__shark__globals.html#ga134d41e34c69c494346367a570bf4ff8">shark::LabeledData&lt; InputT, LabelT &gt;::inputShape()</a>, and <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a71d274e64e2eff7e1f72fa4fe3fb3473">shark::AbstractNearestNeighbors&lt; InputType, LabelType &gt;::m_inputShape</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a05eda57f90ea8bbb9c1fbe773a7075e6" name="a05eda57f90ea8bbb9c1fbe773a7075e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05eda57f90ea8bbb9c1fbe773a7075e6">&#9670;&#160;</a></span>dataset()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt; const  &amp; <a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::dataset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>returns a const reference to the dataset used by the algorithm </p>

<p>Implements <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a22661db718a970568b31ab9ae47d83ad">shark::AbstractNearestNeighbors&lt; InputType, LabelType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00444">444</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

</div>
</div>
<a id="a93240024a5a340943a32c46c88347648" name="a93240024a5a340943a32c46c88347648"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93240024a5a340943a32c46c88347648">&#9670;&#160;</a></span>getNeighbors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> , class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; <a class="el" href="classshark_1_1_tree_nearest_neighbors.html#ad884ac010262866e0fbc13878d7fc0b4">DistancePair</a> &gt; <a class="el" href="classshark_1_1_tree_nearest_neighbors.html">shark::TreeNearestNeighbors</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>, LabelType &gt;::getNeighbors </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_tree_nearest_neighbors.html#a00707a24f04878d9c64546366e3cccea">BatchInputType</a> const &amp;&#160;</td>
          <td class="paramname"><em>patterns</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>returns the k nearest neighbors of the point </p>

<p>Implements <a class="el" href="classshark_1_1_abstract_nearest_neighbors.html#a72a116504675a53f288533bfeff3a96d">shark::AbstractNearestNeighbors&lt; InputType, LabelType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_tree_nearest_neighbors_8h_source.html#l00429">429</a> of file <a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">shark::batchSize()</a>, and <a class="el" href="classshark_1_1_iterative_n_n_query.html#ac980e389bfdd03966ab9eee72491f520">shark::IterativeNNQuery&lt; DataContainer &gt;::next()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/NearestNeighbors/<a class="el" href="_tree_nearest_neighbors_8h_source.html">TreeNearestNeighbors.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
